<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/style.css" />
<script type="text/javascript" src="__TMPL__Common/js/check_dog.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/IA300ClientJavascript.js"></script>
<script type="text/javascript">
	var ACTION_ID ='<?php echo $action_id ?>';
 	var VAR_MODULE = "<?php echo conf("VAR_MODULE");?>";
	var VAR_ACTION = "<?php echo conf("VAR_ACTION");?>";
	var MODULE_NAME	=	'<?php echo MODULE_NAME; ?>';
	var ACTION_NAME	=	'<?php echo ACTION_NAME; ?>';
	var ROOT = '__APP__';
	var ROOT_PATH = '<?php echo APP_ROOT; ?>';
	var CURRENT_URL = '<?php echo trim($_SERVER['REQUEST_URI']);?>';
	var INPUT_KEY_PLEASE = "<?php echo L("INPUT_KEY_PLEASE");?>";
	var TMPL = '__TMPL__';
	var APP_ROOT = '<?php echo APP_ROOT; ?>';
	var LOGINOUT_URL = '<?php echo u("Public/do_loginout");?>';
	var WEB_SESSION_ID = '<?php echo es_session::id(); ?>';
	var EMOT_URL = '<?php echo APP_ROOT; ?>/public/emoticons/';
	var MAX_FILE_SIZE = "<?php echo (app_conf("MAX_IMAGE_SIZE")/1000000)."MB"; ?>";
	var FILE_UPLOAD_URL ='<?php echo u("File/do_upload");?>' ;
	CHECK_DOG_HASH = '<?php $adm_session = es_session::get(md5(conf("AUTH_KEY"))); echo $adm_session["adm_dog_key"]; ?>';
	function check_dog_sender_fun()
	{
		window.clearInterval(check_dog_sender);
		check_dog2();
	}
	var check_dog_sender = window.setInterval("check_dog_sender_fun()",5000);
	
</script>
	<script type="text/javascript" src="__TMPL__Common/js/cropper/jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.timer.js"></script>

<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/weebox.css" />
<script type="text/javascript" src="__TMPL__Common/js/jquery.bgiframe.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.weebox.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/main.css" />
<script type="text/javascript" src="__TMPL__Common/js/cropper/cropper.min.js"></script>

<script type="text/javascript" src="__TMPL__Common/js/script.js"></script>
<script type="text/javascript" src="__ROOT__/public/runtime/admin/lang.js"></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/kindeditor.js'></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/lang/zh_CN.js'></script>


</head>
<body onLoad="javascript:DogPageLoad();">
<div id="info"></div>

<script type="text/javascript">
	$(document).ready(function(){
        var send_type = $("#send_type").val();
        if(send_type==1 || send_type ==2){
            $("#send_define_data").show();
        }else{
            $("#send_define_data").hide();
        }

        $("#send_type").bind("change",function(){
            var send_type=$('#send_type').val();
            if(send_type==2){
                $("#send_define_data").show();
                $("#tip_span").html("请输入房间ID，用空格分隔");
            }else{
                $("#send_define_data").hide();
            }
        });
	});
</script>
<div class="main">
<div class="main_title"><?php echo L("ADD");?> <a href="<?php echo u("Video/online_index");?>" class="back_list"><?php echo L("BACK_LIST");?></a></div>
<div class="blank5"></div>
<form name="add" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">红包大小:</td>
		<td>
			<input name="diamonds" class="textbox require"><span class="tip_span">&nbsp;[指定多个直播间或者全部直播间时，红包会按照直播间人数比例发放]</span>

		</td>
	</tr>
    <tr>
        <td class="item_title">发送人:</td>
        <td class="item_input">
            <select name="send_user_id">
                <?php if(is_array($send_user)): foreach($send_user as $key=>$user): ?><option name="" value="<?php echo ($user["id"]); ?>"> 昵称：<?php echo ($user["nick_name"]); ?> 账号钻石数：<?php echo ($user["diamonds"]); ?></option><?php endforeach; endif; ?>
            </select>
        </td>
    </tr>

	<tr>
		<td class="item_title"><?php echo L("SEND_TYPE");?>:</td>
		<td class="item_input">
			<select name="send_type" id="send_type">
				<option value="0">所有直播间</option>
				<option value="2">单个或多个直播间</option>
			</select>
		</td>
	</tr>
	
	<tr id="send_define_data">
		<td class="item_title"><?php echo L("SEND_DEFINE_DATA");?>:</td>
		<td class="item_input">
			<textarea class="textarea" name="room_id" ></textarea>
			<span class="tip_span" id="tip_span">请输入房间ID，用空格分隔</span>
		</td>
	</tr>
	
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="<?php echo conf("VAR_MODULE");?>" value="Video" />
			<input type="hidden" name="<?php echo conf("VAR_ACTION");?>" value="insert" />
			<input type="hidden" name="prop_id" value="12" />

			<input type="hidden" name="num" value="1" />
			<!--<input type="hidden" name="is_plus" value="1" />-->

			<!--隐藏元素-->
			<input type="submit" class="button" value="<?php echo L("SEND_NOW");?>" />
			<input type="reset" class="button" value="<?php echo L("RESET");?>" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
</body>
</html>